package com.concurrent.chapter5.concurrent02;

import java.util.concurrent.TimeUnit;

public class MyRunnable implements Runnable {
	private User user;
	public MyRunnable(User user) {
		super();
		this.user = user;
	}
	@Override
	public void run() {
		try {
			TimeUnit.SECONDS.sleep(2);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		user.setUsername("admin");
		user.setPassword("123456");
	}
}
